# 09 — SpotGamma Tracking & Reverse Engineering > Daily comparison framework that captures SpotGamma's published indicator-string levels alongside our computed levels for empirical evaluation. Built 2026-05-26 after the SpotGamma indicator (TradingView Pine script, closed source) was identified as the canonical reference. ## Workflow **Each morning ~8:00–8:05 AM ET (after SG's pre-market compute):** 1. Open SpotGamma dashboard → top-right "index levels" box → click **"Copy All"** to get the indicator string. 2. Paste the string verbatim into `~/.schwab/sg-levels-YYYY-MM-DD.txt` (today's date). 3. Run `python dashboard_visual.py` — the dashboard auto-detects the SG file, parses 12 symbols' worth of levels, attaches them to our payload, and persists a comparison line to `reports/level_tracking.jsonl`. The Compare view tab in the dashboard renders a side-by-side table with deltas (`Ours - SG`) for Call Wall, Put Wall, Vol Trigger, Zero Gamma, L1-L4, Abs Gamma, and Spot. ## Indicator-string format 14 numeric fields per symbol, comma-delimited, preceded by `$SYMBOL, SYMBOL,` markers: ``` $SPX, SPX, 7600, 7200, 7395, 7000, 7400, 7500, 7450, 7503, 7601, 7548, 7578, 0.0062, 0.0154, 7319, $SPY, SPY, ... ``` | Position | Field | Notes | |---|---|---| | 1 | Call Wall | Biggest call-side resistance level | | 2 | Put Wall | Biggest put-side support level | | 3 | Vol Trigger | Primary gamma flip (SpotGamma's coined name) | | 4 | L1 | Largest gamma cluster (often a deep-OTM put hedge tail) | | 5 | L2 | Second-largest gamma cluster | | 6 | L3 | Third | | 7 | L4 | Fourth | | 8 | C1 | Largest combo (SPX+SPY merged) cluster | | 9 | C2 | Second | | 10 | C3 | Third | | 11 | C4 | Fourth | | 12 | move_1d_pct | 1-day expected move (decimal: 0.0062 = 0.62%) | | 13 | move_5d_pct | 5-day expected move (decimal) | | 14 | Zero Gamma | Secondary gamma flip / hedge-wall area | Parser lives at `~/projects-personal/schwab-options/sg_levels.py`. Mapping derived empirically 2026-05-26 by cross-referencing string values to labels on SG's TradingView chart (e.g., L3 7517.27 ↔ chart label L3 7517 = **exact match**). Symbols in a daily string: `$SPX, $SPY, $NDX, $QQQ, $RUT, $IWM, $ES1!, $MES1!, $NQ1!, $MNQ1!, $RTY1!, $M2K1!`. ## Symbol mapping (SG → our dashboard) | Our symbol | SG resolution preference | |---|---| | ES | `ES1!` → `MES1!` → `SPX` | | NQ | `NQ1!` → `MNQ1!` → `NDX` | | RUT | `RTY1!` → `M2K1!` → `RUT` | | IWM | `IWM` | | SPX | `SPX` | | NDX | `NDX` | | QQQ | `QQQ` | | SPY | `SPY` | `sg_levels.sg_for_our_symbol(parsed, our_sym)` handles the fallback chain. ## Reverse-engineering: what we've cracked ### L1-L4 — partially solved **Hypothesis tested:** SG's L1-L4 = top 4 strikes ranked by `call_oi + put_oi` within a ±10% strike-distance filter from spot. **Method:** Compute candidate top-4 strikes by four different ranking methods, score against SG's published L1-L4 for each symbol on 2026-05-26: | Symbol family | Best method | Match quality | |---|---|---| | **ETFs** (IWM, QQQ, SPY) | `call_oi + put_oi` | **2-3 of 4 strikes match** ✓ | | **Cash indices** (SPX, NDX) | `call_oi + put_oi` | 1-2 of 4 | | **Futures** (ES, NQ, RUT) | None tested working | 0 of 4 | **Implementation:** `compute_extended()` now emits an `l_levels` field — top 4 strikes by `call_oi + put_oi` within ±10% of spot. Rendered as "L1-L4 (OI clusters)" in the K/V panel + a row group in the Compare view tab. **Why ETFs match best:** - Tight, clean OI distribution - Less far-OTM tail-hedge OI distortion than indices - Strike spacing finer-grained **Why futures fail:** ES/NQ/RUT pull massive OI concentration at deep-OTM put strikes (portfolio insurance), which dominates raw-OI ranking with strikes like ES 6400 (525 pts below spot). SG's published L-levels for futures cluster near-money (e.g., L3 = 7517 with spot 7540), strongly suggesting they use **Synthetic OI** (their intraday-corrected OI from MBO feed) instead of overnight settlement OI. Synthetic OI naturally weights recent flow over old portfolio hedges. Without live MBO subscription (see [[07 - Future Work]] item 4), we can't replicate this exactly. ### C1-C4 — UNSOLVED, research project **Public methodology from SG docs** ([Combo Strike](https://spotgamma.com/combo-strike/)): > "The Combo Strike takes all the SPX Open Interest and combines it with all of the SPY OI, then aggregates the open interest and backs out the equivalent price in both SPX and SPY terms." **What docs don't reveal:** the actual "back out the equivalent price" math. **Evidence the math is non-trivial:** Looking at the conversion factors implied by SG's paired SPX/SPY values for each combo level on 2026-05-26: | Level | SPX value | SPY value | Implied ratio | |---|---|---|---| | C1 | 7503 | 747.95 | 10.031 | | C2 | 7601 | 758.35 | 10.024 | | **C3** | **7548** | **743.49** | **10.153** ← differs from siblings | | C4 | 7578 | 750.92 | 10.092 | The C3 ratio (10.153) is meaningfully different from C1/C2/C4 (~10.02-10.09). This rules out a single global scaling factor. Additionally, **C-level values are off-grid**: SG publishes C1 = 7503 even though SPX trades in 5-pt increments. 7503 cannot be a single strike — it must be a **derived/interpolated value**. **Best-guess working hypothesis:** SG's C-level algorithm is an **OI-weighted centroid** — 1. Map each SPX strike and each SPY strike to a common axis (e.g., SPX-equivalent units) 2. Bin/smooth the combined OI distribution (kernel density estimate or similar) 3. Find local peaks 4. Report each peak's X-coordinate (interpolated, hence off-grid) This would explain the varying ratios (peaks land at strike fractions weighted by neighboring OI density) and the off-grid output. **Community status (web search 2026-05-26):** - jensolson/SPX-Gamma-Exposure (GitHub) — naive ×10 ETF adjustment, doesn't attempt combos - Matteo-Ferrara/gex-tracker — single-product only - FlashAlpha-lab/gex-explained — first-principles GEX walkthrough, no combo logic - phammings/SPX500-Gamma-Exposure-Calculator — single-product only - perfiliev.com GEX blog — theoretical, no SG combo work - No Reddit / Pine Script / academic paper found that attempts SG's specific combo interpolation **Conclusion:** The community has cracked basic single-product GEX. **Nobody has publicly reverse-engineered SG's cross-product centroid interpolation.** This is original research territory for us. **Required to crack it:** 1. **~1-2 weeks of daily paired data** — `(SPX OI distribution, SPY OI distribution, SG's published C1-C4)` triples 2. **Fit a smoothing kernel** that reproduces SG's output across multiple days 3. **Validate** the fitted kernel generalizes (works on out-of-sample days) 4. Optional: model the **basis adjustment** (carry/dividend/tracking-error component that explains the C3 ratio outlier) Status: **collecting daily data via `level_tracking.jsonl`** starting 2026-05-26. Revisit once we have 7-10 days. ## Persistence files | File | What it captures | |---|---| | `reports/level_tracking.jsonl` | Per-symbol, per-run: `{trade_day, ts, symbol, spot, ours: {call_wall, put_wall, vol_trigger, abs_gamma}, sg: {call_wall, put_wall, vol_trigger, zero_gamma, l1-4, c1-4, move_1d_pct, move_5d_pct}}` | | `reports/rut_iwm_scale_tracking.jsonl` | Per-bucket RUT-vs-IWM scale factor empirical measurement (was 10.06 on 2026-05-26 vs theoretical 10.243) | | `~/.schwab/sg-levels-YYYY-MM-DD.txt` | Daily SG indicator string (manual paste) | ## Scoring framework (future) Once we have enough tracking data (target: 10+ trading days), build a scoring script that: 1. For each (date, symbol, level type) tuple, compute: - **Hit rate** — did spot touch this level intraday? (compared via Schwab `/pricehistory`) - **Hold rate** — once touched, did it reverse (call walls) or hold (put walls)? - **Regime accuracy** — was the Vol Trigger's predicted regime correct, measured by realized intraday vol? 2. Compare scores across: - Our levels vs SG's levels (which set is more predictive?) - Our L1-L4 (gamma-weighted via `abs_gamma`) vs SG's L1-L4 (OI-based) — which actually captures pinning? 3. Output a "leaderboard" — which methodology wins per symbol per metric **Why this matters:** answers the central question — *is paying SG worth it, or are our cheaper computed levels good enough for trading?* And: *which deferred improvement (Synthetic OI, IV smile, model-based flip) would actually move the needle?* ## See also - [[00 - Overview]] - [[03 - Math & Sign Conventions]] — gamma formula + sign convention - [[07 - Future Work]] — items #11 (live MBO) and the new SG combo research item - [[08 - SpotGamma Playlist Findings]] — full SG methodology survey from their 99-video learning series